﻿using Cinemachine;
using HT.Framework;
using UnityEngine;

namespace TG
{
    public class CameraManager : HTBehaviour
    {
        private static CameraManager instance;

        public static CameraManager Instance
        {
            get
            {
                if (instance == null)
                {
                    Debug.LogError($"相机尚未初始化完成！！！");
                }

                return instance;
            }
        }

        protected override void Awake()
        {
            instance = this;
            base.Awake();
        }

        public CinemachineVirtualCamera vcam;

        public void InitCamera(Transform tf)
        {
            vcam.Follow = tf;
            vcam.LookAt = tf;
        }
    }
}